package dummy.virussim

import mars.ns.HasState

trait InfectedState extends HasState{

	var immune: Boolean = false
	var infected: Boolean = false

	def setImmune { 
		infected = false;
		immune = true;
	}
	def isImmune : Boolean= immune
	def setInfected = {
	    if(!immune)
	    	infected = true
	}
	def isInfected : Boolean = infected
	def removeInfected {
	    infected = false
	}
	def isHealthy:Boolean={
	    if(!immune && !infected) return true
	    return false
	}

}